using System;
using System.Numerics;

namespace NodeBasedSkillEditor.Model.Node
{
    [Node(Category = DAGHelper.CateName_Math, Name = "Comparison", SearchTag = ">=<=!=")]
    [NodeTypeGroup(TypeGroupId = 1,
        AllowedTypes = new Type[] { typeof(bool), typeof(int), typeof(float), typeof(Vector2), typeof(Vector3), typeof(string), typeof(Enum) })]
    public class Node_Comparison : NodeData
    {
        [Port(IOType = EPortIOType.Input)]
        public EnumPort<ECompMode> Mode = new EnumPort<ECompMode>(ECompMode.LessThan);

        [Port(IOType = EPortIOType.Input, TypeGroup = 1)]
        public ValuePort Value1 = new ValuePort();

        [Port(IOType = EPortIOType.Input, TypeGroup = 1)]
        public ValuePort Value2 = new ValuePort();

        [Port(IOType = EPortIOType.Output)]
        public BooleanPort Result = new BooleanPort();

        public override RT_Node BuildRuntimeNode(RT_DAG parentDAG)
        {
            return new RT.Node_Comparison_RT(this, parentDAG);
        }
    }
}
